//
//  Me_MainBtn_Cell_WX.m
//  ZITHER
//
//  Created by weixin on 2019/5/24.
//  Copyright © 2019 weixn. All rights reserved.
//

#import "Me_MainBtn_Cell_WX.h"

@implementation Me_MainBtn_Cell_WX

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.backgroundColor = HexColor(0xf5f5f5);
    [self setMasonry];
}

-(void)setMasonry{
    
    [self addSubview:self.MainBtnTitle];
    
    [self.MainBtnTitle mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self).offset(5);
        make.left.equalTo(self).offset(15);

        make.width.mas_equalTo(kScreenW-30);
        make.height.mas_equalTo(50);
        make.bottom.equalTo(self).offset(-10);
    }];
    
}


-(Me_MainBtnTitle_View_WX *)MainBtnTitle{
    if (!_MainBtnTitle) {
        _MainBtnTitle = [[Me_MainBtnTitle_View_WX alloc]init];
    }
    return _MainBtnTitle;
}


-(void)setState:(MainBtnTitle_View_State)State{
    _State = State;
    self.MainBtnTitle.State = State;
    NSArray *arrTitle = @[@"我的消息",@"买表询价",@"我要卖表",@"联系过商家"];
    NSArray *arrTitleSub = @[@"",@"二手比价-评价商家",@"预估价",@""];
    NSArray *arrImage = @[@"我的_我的消息",@"我的_买表询价",@"我的_我要卖表",@"我的_联系商家"];
    self.MainBtnTitle.pic1.image = [UIImage imageNamed:arrImage[self.indexPath.row-2]];
    self.MainBtnTitle.title.text = arrTitle[self.indexPath.row-2];
    self.MainBtnTitle.titleSub.text = arrTitleSub[self.indexPath.row-2];

    
}

//-(QMUIButton *)btnReceive{
//    if (!_btnReceive) {
//        _btnReceive = [[BaseBtn alloc]init];
//        _btnReceive.frame = CGRectMake(14,CGRectGetMaxY(self.labUserPhone.frame)+kScreenH/100*12, kScreenW-28, 44);
//        _btnReceive.titleLabel.font = [UIFont fontWithName:@"PingFang-SC-Regular" size:17];
//        [_btnReceive setCornerRadiusWithRadius:8 isMasks:YES];
//        [_btnReceive setBorderWithColor:[UIColor colorWithHex:@"333333"] width:1];
//        [_btnReceive setTitle:@"我的消息" forState:UIControlStateNormal];
//        [_btnReceive setTitle:@"3条新消息" forState:UIControlStateSelected];
//        [_btnReceive setTitleColor:[UIColor whiteColor] forState:UIControlStateSelected];
//        [_btnReceive setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
//        _btnReceive.backgroundColor = [UIColor whiteColor];
//        if ([Main_Token_Model_MANAGER.isToken isEqualToString:@"1"]){
//            //            _btnReceive.hidden = YES;
//        }
//        @weakify(self);
//        [[_btnReceive rac_signalForControlEvents:(UIControlEventTouchUpInside)] subscribeNext:^(__kindof UIControl * _Nullable x) {
//            @strongify(self);
//
//            Ugc_Receive_VC_WX *vc = [[Ugc_Receive_VC_WX alloc]init];
//            [self.getNav pushViewController:vc animated:YES];
//
//            if (!self.btnReceive.selected) {
//                self.btnReceive.selected = !self.btnReceive.selected;
//            }else{
//
//            }
//
//        }];
//    }
//    return _btnReceive;
//}




@end
